#include<iostream>
#include<cmath>
#include<stdio.h>
#include<stdlib.h>
using namespace std;

long long C(int n, int m)
{
    if (m < n - m) m = n - m;
    long long ans = 1;
    for (int i = m + 1; i <= n; i++) ans *= i;
    for (int i = 1; i <= n - m; i++) ans /= i;
    return ans;
}

int main() {
    unsigned int v;
    cin >> v;
    unsigned char* a=(unsigned char*)&v;
    cout << hex;
    cout << v << endl;

    for (int i = 0; i < 4; i++) {
        cout << int(a[i]);
        if (i != 3) cout << " ";
    }/* unsigned int v;
    cin >> v;
    cout << hex;
    cout << v << endl;
    unsigned char* p = (unsigned char*)&v;

    for (int i = 0; i < 4; i++)
    {
        cout << int(p[i]);
        if (i != 3)
        {
            cout << " ";
        }
    }*/

    return 0;
} 